if(typeof yuki == "undefined") {
	var yuki = {};
}
yuki.getUrlStringId = function(name) { // 获取URL传过来的参数
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
	var r = window.location.search.substr(1).match(reg);
	if(r != null) return decodeURI(r[2], 'utf-8');
	return null;
}

yuki.check = function(id) {
	$('#' + id).keyup(function() {
		var reg = $(this).val().match(/\d+\.?\d{0,2}/);
		var txt = '';
		if(reg != null) {
			txt = reg[0];
		}else{
			$('.error-tip').show(500);
		}	
		$(this).val(txt);
	}).change(function() {
		$(this).keypress();$('.error-tip').hide(500);
		var v = $(this).val();
		if(/\.$/.test(v)) {
			$(this).val(v.substr(0, v.length - 1));
		}
	});
}